﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OControlTicketEdit.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.MacModel.OControlTicketEdit" %>
<div class="pageContent">
	<form id="Form1"  action="MacModel/OControlTicketEdit.aspx?ajaxmethod=edit" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone);">
    <div class="pageFormContent" layoutH="56">   
            <table width="100%" style=" border-spacing: 5px!important;">
                <tr>
                    <td width="90px">机型：</td>
                    <td colspan="3">
                        <%=GetMacType("checkbox", "MachineType", obj.MachineType)%>
                    </td>
                </tr>  
                <tr>
                    <td width="90px">编号：</td>
                    <td width="200px">
                       <input type="text" name="TNO" class="required" alt="请输入编号" value=<%=obj.TNO %>  />
                    </td>
                    <td width="90px">设变号码：</td>
                    <td width="200px">
                       <input type="text" name="SetNumber" class="required" alt="请输入设变号码" value="<%=obj.SetNumber %>"  />
                    </td>
                </tr>
                <tr>

                    <td width="90px">供应商：</td>
                    <td colspan="3">
                       <input type="text" name="SupplierName" class="" value=<%=obj.SupplierName %>  alt="请输入供应商"  autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getsupplierlist" swidth="300"/>
                    </td>
                </tr>
                <tr> 
                    <td>管制理由：</td>
                    <td  colspan="3">
                        <%=GetControlReason("ControlReason",obj.ControlReason) %>
                      
                    </td>
                </tr> 
                <tr>
                    <td>开出日期：</td>
                    <td>
                        <input type="text" name="OpenDate" class="date required" alt="" value="<%=obj.OpenDate.ToString("yyyy-MM-dd") %>"  />
                    </td>
                    <td>核准日期：</td>
                    <td>
                         <input type="text" name="ApprovalDate" class="date required" alt="" value="<%=obj.ApprovalDate.ToString("yyyy-MM-dd") %>" />
                    </td>
                </tr>           
            </table> 
            <div style="margin:2px 0px;" class="accordion">
		        		      
                    <table width="100%" class="table">
                        <thead >
                            <tr>
                               
                                <th>零件号码</th>
                                <th>零件名称</th>
                                <th>数量</th>
                                <th>变更内容及注意事项</th>
                            </tr>
                        </thead>
                        <tbody>
                         <asp:repeater id="rpMenu" runat="server">
                            <ItemTemplate>
                            <tr>                               
                                <td><input type="text" name="ItemCode" value="<%# Eval("ItemCode") %>" class="autocomplete" autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getoitmlist&showtype=101" swidth="300" showinputid="OControlTicketAdd_itemname<%# Eval("TIID") %>"/></td>
                                <td><input type="text" name="ItemName" value="<%# Eval("ItemName") %>" id="OControlTicketAdd_itemname<%# Eval("TIID") %>"/></td>
                                <td><input type="text" name="Quantity" value="<%# Eval("Quantity") %>" /></td>
                                <td><input type="text" name="Note" value="<%# Eval("Note") %>" /></td>
                            </tr>
                            </ItemTemplate>
                         </asp:repeater>                               
                        </tbody>
                    </table>                                 
		    </div>
            <div style="margin:2px 0px;">
                <table width="100%">
                    <tr>
                        <td width="90px"  valign="top"><label>质量部判定：</label></td>
                        <td>
                           <label><input type="radio" name="QualityJudgement" value="可量试" <%=obj.QualityJudgement=="可量试"?"selected":"" %> />可量试</label>
                           <label><input type="radio" name="QualityJudgement" value="可量产" <%=obj.QualityJudgement=="可量产"?"selected":"" %> />可量产</label>
                           <label><input type="radio" name="QualityJudgement" value="暂停开发" <%=obj.QualityJudgement=="暂停开发"?"selected":"" %> />暂停开发</label>
                           <label><input type="radio" name="QualityJudgement" value="再试制" <%=obj.QualityJudgement=="再试制"?"selected":"" %> />再试制</label>
                           <label><input type="radio" name="QualityJudgement" value="再量试" <%=obj.QualityJudgement=="再量试"?"selected":"" %> />再量试</label>
                        </td>
                    </TR>
                    <tr>
                        <td width="90px"  valign="top">管制机号：</td>
                        <td>
                            <textarea name="SerialNumber1" class="required" cols="80" rows="5"><%=obj.SerialNumber1 %></textarea>
                        </td>
                    </TR>
                    <tr>
                        <td width="90px"  valign="top">备注：</td>
                        <td>
                            <textarea name="Remark"  cols="80" rows="5"><%=obj.Remark%></textarea>
                        </td>
                    </tr>
                     <tr>
                        <td>原件扫描上传：</td>
                        <td>
                            <input type="file" name="filedata" id="OControlTicketEdit_AttachmentFile_upload" uploadify="uploadify" onUploadSuccess="onEditOControlTicketUploadSuccess">
                            <input type="hidden" name="AttachmentFile" id="OControlTicketEdit_AttachmentFile" value="<%=obj.AttachmentFile %>" />(如果不修改,请不要重新点上传)
                              <script type="text/javascript">
                                  function onEditOControlTicketUploadSuccess(file, data, response) {
                                      if (!response)
                                          return false;
                                      data = eval("(" + data + ")");
                                      if (!data.uploadResult) {
                                          alert(data.errMsg);
                                          return;
                                      }
                                      var $imgUploadPath = data.filePath;
                                      var $trageId = data.customerInfo;
                                      //alert($imgUploadPath)
                                      $("#OControlTicketEdit_AttachmentFile").val($imgUploadPath);
                                     // alert($("#OControlTicketEdit_AttachmentFile").val())
                                  }
                            </script>
                        </td>
                    </tr>
                </table>
            </div>
            
    </div>
    <div class="formBar">
   
			<ul>
				<li><div class="buttonActive"><div class="buttonContent">                 
                    <button type="submit">保存</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
       
	</form>
    </div>